import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
const tempRoutes = [
  {
    path: '/temp1',
    name: 'temp1',
    meta: {
      title: '天地图底图渲染'
    },
    component: () => import('@/Temps/Temp1/index.vue')
  },
  {
    path: '/temp2',
    name: 'temp2',
    meta: {
      title: 'geojson类型及格式'
    },
    component: () => import('@/Temps/Temp2/index.vue')
  },
  {
    path: '/temp3',
    name: 'temp3',
    meta: {
      title: 'geojson渲染'
    },
    component: () => import('@/Temps/Temp3/index.vue')
  },
  {
    path: '/temp4',
    name: 'temp4',
    meta: {
      title: 'geojson渲染'
    },
    component: () => import('@/Temps/Temp4/index.vue')
  },
]

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      redirect: '/demo1'
    },
    {
      path: '/demo1',
      name: 'demo1',
      component: () => import('@/Demos/Demo1/index.vue')
    },
    {
      path: '/demo2',
      name: 'demo2',
      component: () => import('@/Demos/Demo2/index.vue')
    },
    ...tempRoutes
  ]
})
